{#
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% macro module_tag(
  title,
  anchor
) -%}
<a class="c-module-tag" href="#{{ anchor }}">
  <h2 class="c-module-tag-title">{{ title }}</h2>
  <span class="c-module-copy" role="tooltip">Copy to clipboard</span>
  <span class="c-module-copied" role="tooltip" aria-live="polite">Link copied!</span>
</a>
{%- endmacro %}

{% macro browser_border(
  dark_theme=False,
  class=None
) -%}
<div class="c-browser {% if class %} {{ class }}{% endif %}">
  <div class="c-browser-bar">
    <!-- dots -->
    <span class="c-browser-bar-dot"></span>
    <span class="c-browser-bar-dot"></span>
    <span class="c-browser-bar-dot"></span>
    <!-- close sign -->
    <span class="c-browser-bar-close"></span>
  </div>
  <div class="c-browser-content {% if dark_theme %} mzp-t-dark{% endif %}">
    {{ caller() }}
  </div>
</div>
{%- endmacro %}
